package cn.zhengzhou.springbootmybatis.demo;

public class InnerClass {
    public static void main(String[] args) {
//        Animal cat = new Cat();
//        cat.eat();
        Animal a = new Animal(){
            @Override
            public void eat(){
                System.out.println("喵喵爱吃猫条");
            }
        };
        a.eat();
        Swim swim = ()->{
            System.out.println("我不会游泳");
        };
        swim.swimming();
    }
}
@FunctionalInterface
interface Swim{
    void swimming();
}
/*class Cat extends Animal {
    @Override
    public void eat() {
        System.out.println("中午吃的面条");
    }
}*/
